package com.sky.happygos.ui.activity.fragment;

import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;

import com.sky.happygos.R;
import com.sky.happygos.ui.activity.adapter.ShopAdapter;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.ViewById;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by qqqqqqq on 2017/4/14.
 */
@EFragment(R.layout.fragment_shop)
public class ShopF extends Fragment {

    @ViewById(R.id.rv_shop)
    RecyclerView recyclerView;

    ShopAdapter shopAdapter;

    @AfterViews
    public void init(){
        List<String> list = new ArrayList<>();
        list.add("xxxx");
        list.add("xxxx");


        shopAdapter = new ShopAdapter(getContext(),list);
        shopAdapter.setMyItemClickListener(new ShopAdapter.MyItemClickListener() {
            @Override
            public void onItemClick(View view, int postion) {

            }
        });

        recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        recyclerView.setAdapter(shopAdapter);



    }
    private void setFooterView(RecyclerView view){
//        View footer = LayoutInflater.from(getContext()).inflate(R.layout.item_shop_foot, view, false);
//        shopAdapter.(footer);
    }
}
